<?php


namespace App\Providers;


use Xy\Rbac\Middleware\AccessAuthenticateMiddleware;
use Xy\Rbac\Providers\RbacServiceProvider;

class AdminRbacServiceProvider extends RbacServiceProvider {
    /**
     * api前缀
     * @var string
     */
    protected $_routePrefix = '/admin/v1/';
    
    /**
     * 是否使用dingo
     * @var bool
     */
    protected $_isDingo = true;
    
    /**
     * 额外中间件
     * @var array
     */
    protected $_otherMiddlewareList = [AccessAuthenticateMiddleware::class];
    
    /**
     * @return void
     */
    public function boot() {
        \Xy\Rbac\Utils\UserHelper::$guard = null;//设定guard,供用户角色分配列表使用
        parent::boot();
    }
}